import { Column, Entity, PrimaryGeneratedColumn } from "typeorm";

@Entity("feedback", { schema: "alumni" })
export class Feedback {
  @PrimaryGeneratedColumn({ type: "int", name: "id", unsigned: true })
  id: number;

  @Column("int", {
    name: "school_id",
    comment: "所属学校",
    unsigned: true,
    default: () => "'0'",
  })
  schoolId: number;

  @Column("int", {
    name: "user_id",
    comment: "用户",
    unsigned: true,
    default: () => "'0'",
  })
  userId: number;

  @Column("int", { name: "type_id", unsigned: true, default: () => "'0'" })
  typeId: number;

  @Column("varchar", { name: "phone", length: 11, default: () => "'手机'" })
  phone: string;

  @Column("varchar", { name: "content", comment: "内容", length: 200 })
  content: string;

  @Column("json", { name: "pics", nullable: true, comment: "图片" })
  pics: object | null;

  @Column("tinyint", {
    name: "status",
    comment: "处理状态",
    default: () => "'0'",
  })
  status: number;

  @Column("int", { name: "create_time", unsigned: true, default: () => "'0'" })
  createTime: number;
}
